<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户主页 - 银行储蓄系统</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap" rel="stylesheet">
    <style>
        body {
            min-height: 100vh;
            margin: 0;
            background: linear-gradient(135deg, #e0e7ff 0%, #f0fdfa 100%);
            font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .glass-card {
            background: rgba(255, 255, 255, 0.7);
            border-radius: 24px;
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            max-width: 1280px;
            width: 100%;
            padding: 40px 36px 36px 36px;
            margin: 40px auto;
            /* animation: fadeIn 1.2s cubic-bezier(.39,.575,.56,1.000); */
        }
        /* @keyframes fadeIn {
            0% { opacity: 0; transform: translateY(40px); }
            100% { opacity: 1; transform: translateY(0); }
        } */
        .welcome-header {
            background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
            color: white;
            padding: 28px 20px 20px 20px;
            border-radius: 18px;
            margin-bottom: 32px;
            text-align: center;
            box-shadow: 0 2px 12px rgba(37,99,235,0.10);
        }
        .welcome-header h2 {
            font-size: 2.1rem;
            font-weight: 700;
            letter-spacing: 2px;
            margin-bottom: 8px;
            font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
        }
        .operation-buttons {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 18px;
            margin-bottom: 20px;
        }
        .operation-button {
            padding: 18px 0 12px 0;
            text-align: center;
            background: rgba(255,255,255,0.85);
            border: 1.5px solid #e0e7ff;
            border-radius: 16px;
            text-decoration: none;
            color: #2563eb;
            font-size: 1.08em;
            font-weight: 600;
            letter-spacing: 1px;
            box-shadow: 0 2px 12px rgba(37,99,235,0.07);
            transition: all 0.22s cubic-bezier(.39,.575,.56,1.000);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .operation-button:hover {
            background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
            color: white;
            transform: translateY(-4px) scale(1.04);
            box-shadow: 0 8px 32px rgba(37,99,235,0.13);
        }
        .operation-button i {
            font-size: 1.7em;
            margin-bottom: 6px;
        }
        .account-info {
            font-size: 1.1em;
        }
        .account-info span {
            font-weight: bold;
            color: #2563eb;
        }
        .card {
            margin-bottom: 20px;
            border-radius: 18px;
            box-shadow: 0 2px 12px rgba(31, 38, 135, 0.08);
            border: 1.5px solid #e0e7ff;
            background: rgba(255,255,255,0.92);
        }
        .card-title {
            color: #2563eb;
            font-weight: 700;
            letter-spacing: 1px;
        }
        .table {
            background: rgba(255,255,255,0.98);
            border-radius: 12px;
            overflow: hidden;
        }
        .table th {
            background: #e0e7ff;
            color: #2563eb;
            font-weight: 700;
        }
    </style>
    <!-- 图标库 -->
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css">
</head>
<body>
    <div class="glass-card">
        <div class="welcome-header">
            <h2>欢迎使用银行储蓄系统</h2>
            <p class="mb-0">尊敬的 <span th:text="${user.customerName}">用户</span>，您好！</p>
        </div>

        <div class="row">
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">账户信息</h5>
                        <div class="account-info">
                            <p>卡号：<span th:text="${card.cardID}">1234567890</span></p>
                            <p>存款类型：<span th:text="${savingName}">活期</span></p>
                            <p>账户余额：<span th:text="${card.balance}">0.00</span> 元</p>
                            <p>开户日期：<span th:text="${#dates.format(card.openDate, 'yyyy-MM-dd')}">2024-01-01</span></p>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-8">
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">快捷操作</h5>
                        <div class="operation-buttons">
                            <a href="/user/deposit" class="operation-button">
                                <i class="bi bi-cash"></i>
                                <div>存款</div>
                            </a>
                            <a href="/user/withdraw" class="operation-button">
                                <i class="bi bi-cash-stack"></i>
                                <div>取款</div>
                            </a>
                            <a href="/user/transfer" class="operation-button">
                                <i class="bi bi-arrow-left-right"></i>
                                <div>转账</div>
                            </a>
                            <a href="/user/query" class="operation-button">
                                <i class="bi bi-search"></i>
                                <div>余额查询</div>
                            </a>
                            <a href="/user/security" class="operation-button">
                                <i class="bi bi-shield-exclamation"></i>
                                <div>挂失/解挂与修改密码</div>
                            </a>
                            <a href="/user/logout" class="operation-button">
                                <i class="bi bi-box-arrow-right"></i>
                                <div>退出登录</div>
                            </a>
                        </div>
                    </div>
                </div>

                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">最近交易记录</h5>
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>交易时间</th>
                                        <th>交易类型</th>
                                        <th>卡号</th>
                                        <th>交易金额</th>
                                        <th>备注</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr th:each="trade : ${recentTrades}">
                                        <td th:text="${#dates.format(trade.tradeDate, 'yyyy-MM-dd HH:mm:ss')}">2024-01-01 12:00:00</td>
                                        <td th:text="${trade.tradeType}">存款</td>
                                        <td th:text="${trade.cardID}">1234567890</td>
                                        <td th:text="${trade.tradeMoney}">1000.00</td>
                                        <td th:text="${trade.remark}">工资入账</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</body>
</html> 